package com.mg.game.base;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.view.MotionEvent;

import com.mg.framework.kernel.Actor;
import com.mg.framework.kernel.Assets;
import com.mg.framework.kernel.GameApplication;
import com.mg.framework.kernel.Screen;
import com.mg.framework.kernel.Touchable;

public class ExitGame extends Actor implements Touchable {

	public ExitGame(Screen screen, Bitmap bitmap) {
		super(screen, bitmap);
		this.setX(this.screen.getXCenter() - bitmap.getWidth() / 2);
		this.setY(this.screen.getYCenter() + 10);
	}

	@Override
	public void gameUpdate() {
		return;
	}

	@Override
	public void screenUpdate(Canvas canvas) {
		this.drawSelf(canvas,null);
	}

	@Override
	public void onTouchEvent(MotionEvent event) {
		GameApplication.me.getMG().finish();
	}

	@Override
	public boolean isTouched(MotionEvent event) {
		return this.defaultIsTouched(event);
	}
}
